<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>系统参数管理</title>
<#include "/WEB-INF/content/module-index.html">
<script type="text/javascript">
function pub() {

	var baseUrl = moduleUrl.substring(0,moduleUrl.lastIndexOf("/") );
	var parent = "";
	if (hasParent())
		parent = "_" + parentId;
	top.openModule(moduleId + "-add", moduleName + "-新增", baseUrl + "/public"
			+ parent);
}

function typeFormatter(value,rowData,rowIndex){
	if(value==0){
		return "android";
	}else
		if(value==1){
			return "ios";
		}else
			return "未知";
}
function isMustFormatter(value,rowData,rowIndex){
	  if(value==0){
          return "不需要升级";
  }else
      if(value==1){
    	  return "非强制升级";
      }else
          if(value==2){
              return "强制升级";
          }else
              return "未知";
}
</script>
</head>
<body>
<body class="easyui-layout">
	<div region="center" style="padding: 5px; background: #eee;">
		<div id="toolbar">
			<@auth code="base:version:public"><a href="javascript:void(0);" class="easyui-linkbutton" plain="true" iconCls="icon-add" style="border: 1px solid #ccc;" onclick="javascript:pub()">发布新版本</a></@auth>
			<@auth code="base:version:*:edit">
				<a href="javascript:void(0);" class="easyui-linkbutton" plain="true" iconCls="icon-edit" style="border: 1px solid #ccc;" onclick="javascript:edit()">编辑</a>
			</@auth>
			<@auth code="base:version:*:delete">
				<a href="javascript:void(0);" class="easyui-linkbutton" plain="true" iconCls="icon-remove" style="border: 1px solid #ccc;" onclick="javascript:del()">删除</a>
			</@auth>
		</div>
		<table id="grid" class="easyui-datagrid" url="query" idField="vid" rownumbers="true" striped="true" fitColumns="true" fit="true" pagination="true" singleSelect="true" toolbar="#toolbar">
			<thead>
				<tr>
					<th field="versionnumber" width="10">版本号</th>
					<th field="platform" width="5" formatter="typeFormatter">平台</th>
					<th field="ismustupgrade" width="5" formatter="isMustFormatter">强制升级</th>
					<th field="lowestversion" width="5">最低版本</th>
					<th field="createtime" width="10">创建时间</th>
					<th field="creator" width="5">创建者</th>
					<th field="url" width="30">链接地址</th>
					<th field="intro" width="30">版本介绍</th>
				</tr>
			</thead>
		</table>
	</div>
</body>
</html>